import React from 'react'
import { array } from 'prop-types'

const Posts = ({ posts }) =>
  <ul>
    {posts.map((post, i) => <li key={i}>{post.title}</li>)}
  </ul>

Posts.propTypes = {
  posts: array.isRequired,
}

export default Posts
